﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;

namespace Entities
{
    public class NhaCungCap
    {
    


        [PrimaryKey]
        public string MaNCC { get; set; }

        public string TenNCC { get; set; }
        public string SDT { get; set; }
        public string DiaChi { get; set; }

        [Association(ThisKey = "MaNCC", OtherKey = "NhaCC")]
        public List<HangHoa> dshanghoa { get; set; }
        [MapIgnore]
        public string TenDSHH
        {
            get
            {
                string s = "", k = "";
                foreach (var item in dshanghoa)
                    s += item.TenHH + ",";
                k = s.Substring(0, s.Length - 1);
                return s;

            }
        }








 
    }
}
